package cn.liying.org.domain;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 部门实体类
 */
@Data
public class Department {
    //主键
    private Long id;
    //说明
    private String sn;
    //名字
    private String name;
    //部门层级路径
    private String dirPath;
    //状态 （0:启动,-1:禁用）
    private Integer state;
    //没用
    private Long manager_id;
    //部门经理
    private Employee manager;
    //没用
    private Long parent_id;
    //上级部门
    private Department parent;
    //下级部门组
    private List<Department> children = new ArrayList<>();

    public Department() {
    }

    public Department(Long id, String sn, String name, String dirPath, Integer state, Employee manager, Department parent, List<Department> children) {
        this.id = id;
        this.sn = sn;
        this.name = name;
        this.dirPath = dirPath;
        this.state = state;
        this.manager = manager;
        this.parent = parent;
        this.children = children;
    }
}
